//
//  LKBaseTableViewController.swift
//  新浪微博
//
//  Created by 胡不归是大虾 on 16/9/24.
//  Copyright © 2016年 胡不归是大虾. All rights reserved.
//

import UIKit

class LKBaseTableViewController: UITableViewController, LKVisitorLoginViewDelegate {

    override func viewDidLoad() {
        super.viewDidLoad()


    }
    
    var userlogin = LKUserInforViewModel.sharedUserInfoViewModel.isLogin
    var vistorView = LKVisitorLoginView()
    override func loadView() {
        if userlogin {
            //如果用户已经登录,就正常显示内容
            super.loadView()
        }
        else
        {
            //否则显示访客视图
            view = vistorView
            vistorView.delegate = self
        }
    }


    // MARK: - Table view data source



    override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
        // #warning Incomplete implementation, return the number of rows
        return 0
    }
    
    func userWillLogin() {
        let oauth = LKOAuthViewController()
        let nav = UINavigationController(rootViewController: oauth)
        present(nav, animated: true, completion: nil)
        
    }

}
